package com.yupi.springbootinit.controller;/*
@author name
@data 2025/3/10-20:19
*/

import com.yupi.springbootinit.common.BaseResponse;
import com.yupi.springbootinit.common.ResultUtils;
import com.yupi.springbootinit.model.dto.chart.GetPictureByAiRequest;
import com.yupi.springbootinit.model.vo.PictureVO;
import com.yupi.springbootinit.service.PictureService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/picture")
@Slf4j
public class PictureController {

    @Resource
    private PictureService pictureService;


    /**
     * 分析图片结论
     * @param getPictureByAiRequest
     * @return
     */
    @PostMapping
    public BaseResponse<PictureVO> getPictureMessage(GetPictureByAiRequest getPictureByAiRequest, HttpServletRequest request) {
        PictureVO pictureMessage = pictureService.getPictureMessage(getPictureByAiRequest, request);
        return ResultUtils.success(pictureMessage);
    }
}


